﻿using System;

namespace CodeCamp.BL.UI
{
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
	public class MvcMenuItemAttribute : Attribute
	{

		public string MenuText { get; set; }

		public int Order { get; set; }

		public string ParentLink { get; set; }

		internal string Controller { get; set; }

		internal string Action { get; set; }


		#region ctor

		public MvcMenuItemAttribute(string menuText) : this(menuText, 0) { }
		public MvcMenuItemAttribute(string menuText, int order)
		{
			MenuText = menuText;
			Order = order;
		}



		internal string Link { get { return string.Format("/{0}/{1}", Controller, this.Action); } }

		internal MvcMenuItemAttribute ParentItem { get; set; }
		#endregion
	}
}


